package designMode.decoratorPattern;

/**
 * @ClassName Test
 * @Description 调料3
 * @Author LIBOFEI
 * @Date 2020/6/15 16:45
 * @Version 1.0
 **/
public class Test {

    public static void main(String[] args) {
        Beverage beverage = new Espresso();
        System.out.println(beverage.getDescription() + ",$" + beverage.cost());
        Beverage blood = new Blood();
        System.out.println(blood.getDescription() + ",$" + blood.cost());

        Beverage blood2 = new Blood();
        blood2.setSize(2);
        blood2 = new Mocha(blood2);
        blood2 = new Soy(blood2);
        blood2 = new Whip(blood2);
        System.out.println(blood2.getDescription() + ",$" + blood2.cost() +",size:" + blood2.getSize());
    }
}
